home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 26 / AMIGAplus Sonderheft 26 (2000)(Falke)(DE)(Track 1 of 2)[!].iso / Tools / SFX-Player / mpega / mpega.doc < prev    next >
Text File  |  1999-03-29  |  14KB  |  357 lines

  1. -------------------------------------------------------------------------------
  2.  
  3.                  MPEGA 3.5  (21-Dec-1998) (68020+) (GIFTWARE)
  4.  
  5. -------------------------------------------------------------------------------
  6.  
  7.  
  8. Distribution Conditions
  9. -----------------------
  10.  
  11.   This program is copyright (c) 1995-1998 by Stephane TAVENARD.
  12. It may be distributed freely under the condition that no profit is
  13. gained from its distribution, nor from any other program distributed
  14. in the same package.
  15.  
  16.   Permission is granted to distribute this package by Bulletin Board
  17. systems or network sites, under the condition that no fee is charged
  18. on downloading it.
  19.  
  20.   All files that are part of this package have to be distributed
  21. together and none of them may be changed in any way other than
  22. archiving or crunching.  The only exception to this rule are the
  23. icons, including the tooltypes, which may be changed to accommodate
  24. them to the rest of the disk it is distributed on.
  25.  
  26.   This program is distributed as freeware (and giftware).
  27.  
  28. Disclamer
  29. ---------
  30.  
  31.   This package is provided "as is" without warranty of any kind.
  32. The author assumes no responsibility or liability whatsoever
  33. for any damage or dataloss caused by using this package.
  34.  
  35.  
  36. Introduction
  37. ------------
  38.  
  39. What is MPEG audio ?
  40.  
  41. It's a very efficient audio compression standard. Actually, there is 3
  42. compression methods, named layer I, II & III. Layer III is more efficient
  43. than layer II, which is more efficient than layer I. But, more efficient
  44. means more complex.
  45. MPEG audio allows to compress a 16-bit PCM sound file from 1.2 to
  46. 32 times.
  47.  
  48. Why is it so hard to make a real time MPEG audio decoder ?
  49.  
  50. MPEG audio decoding requires a lot of arithmetic calculation, so a lot of CPU
  51. power is required. Normally, MPEG audio decoding is made with help of a DSP.
  52.  
  53.  
  54. History
  55. -------
  56.  
  57. V1.0    23-Jun-1995     First aminet release
  58. V1.1    09-Sep-1995     Added mixing audio output. For example, it can play at
  59.                         28000Hz a 11025Hz decoded stream (-d4 option).
  60. V1.2B   31-Jul-1996     68020..68040 and 68060 versions
  61.                         Buffer time can be set by user
  62.                         Can play half rate if private bit is set in mpeg stream
  63. V1.3    01-Nov-1996     Added MPEG2 low sampling frequencies
  64. V2.0    31-Mar-1997     Added Layer III !
  65. V2.1    02-Apr-1997     -x option now works (missing !)
  66. V2.2    05-Apr-1997     Corrected bug in MPEG I,II dequantization
  67.                         IMDCT now in pure asm
  68.                         Decoding Layer III is now 20% faster than V2.1
  69. V2.2B   06-Apr-1997     Added MPEG2.5 support
  70.                         Fixed bug in subband synthesis filter
  71. V2.3    11-Apr-1997     Optimized subband synthesis filter
  72.                         play audio as default (-s to silence)
  73.                         added priority option (-p)
  74. V2.4    19-Apr-1997     Optimized huffman decoding of Layer III
  75.                         Added AHI support (-I option)
  76.                         Use now async I/O for reading input file
  77.                         Improved multitasking capabilities
  78. V2.5    03-May-1997     Fixed bug for 48kHz & 24kHz streams
  79.                         Fixed bug in that swallows end of sound
  80.                         Added seek into stream (-S option)
  81.                         Use of AHI V4
  82.                         Fixed bug when stopping with Ctrl-C
  83.                         Re-enabled AIFF header (-A option)
  84.                         Added max decoding frequency (-F option)
  85. V2.6    16-May-1997     Added Time counter (-T option)
  86.                         Fixed small bug into IMDCT of layer III
  87.                         Fixed "Audio skipping" bug at start of play
  88. V2.7    18-May-1997     Optimized Subband synthesis (global gain = 20% on 060 !)
  89.                         Added synchronization tolerance (allows to read some incorrect bitstreams)
  90.                         No more crash if input stream is not MPEG Audio
  91. V2.8    24-May-1997     All output text info is now output to stdio instead of stderr
  92.                         Audio manager use now soft interrupts
  93. V2.9    29-May-1997     Added -w option to wait for audio buffer to be full before starting audio
  94.                         Added -b option to set the input file buffer size (default is 16KB)
  95.                         Gain of 6% for layer III decoding (on '060)
  96. V3.0    15-Jul-1997     FPU Version use now Optimized FPU routines (no more INTEGER calc.)
  97.                         -> FPU is slower than non FPU version, but provides more quality
  98.                         Suppressed MPEG Audio header check (some streams have pb with it)
  99.                         Corrected bad lock when opening stream (MUFS files didn't work)
  100.                         New Huffman filling buffer (Decoding layer III is 5% faster on a 060)
  101.                         -a option to display audio buffer fill level (in secs)
  102.                         Audio buffer size can be more than 32 secs now
  103.                         Added WAVE output option (-W)
  104.                         Added Decoding parameters output option (-D)
  105.                         Faster dequantization & stereo process in layer III
  106.                         Play list as input file with -l option
  107.                         Output file can be specified with -o <file> option
  108.                         Added a config file (default is MPEGA:MPEGA.CFG, then MPEGA.CFG):
  109.                            - separate mpeg decoder options for Layer I&II and III, mono and stereo files
  110.                            - default options
  111.                         Added -C option to display current configuration
  112.                         Now time used is only displayed if -u option is set
  113. V3.1    23-Jul-1997     Corrected WAVE Format (bug in size calc)
  114.                         Added -r option to disable Async I/O for input file (don't lock input file)
  115.                         Suppressed the need for an MPEGA: assign (sorry about this...)
  116.                         Read MPEGA.CFG now from ENV:, S:, PROGDIR:, and then current directory.
  117.                         Added -N option to display filename
  118. V3.2    16-Aug-1997     Version string format now STYLEGUIDE compliant
  119.                         Added Random play for playlist (-R option)
  120.                         Added TAG info display (-i option)
  121. V3.3    29-Aug-1997     Output display changed
  122. V3.4    22-Jun-1998     Only one generic version now, use of mpega.library.
  123.                         Added '-e' option to prevent loading default config file.
  124.                         Added '-y' option to dynamically boost the volume.
  125.                         Added '-k' option to scale the decoded output samples (need mpega.library 2.0+)
  126.                         Added '-V' option to get volume value from file comment (VOL=xx)
  127.                         Added '-K' option to get scale value from file comment (SCA=xx)
  128.                         TAG'id genres update
  129. V3.45   23-Jul-1998     Re-enabled '-p' priority option
  130. V3.5    21-Dec-1998     Added '-L' option to play <ms> length of sound
  131.  
  132. Description
  133. -----------
  134.  
  135. You need at least a 68020 CPU to use it !
  136.  
  137. This is an highly optimized MPEG audio decoder. This one can decode MPEG audio
  138. standard streams, layer I, II & III. The output can be either a raw PCM file
  139. or AMIGA-builtin audio device (14-bit/cybersound/AHI).
  140.  
  141. Requierements
  142. -------------
  143.  
  144. mpega.library that matches your kind of CPU.
  145.  
  146. *******************************************$$$$$$$$$$$$$$$$$************************
  147. *****                                                                          *****
  148. ***** USE NON FPU VERSION OF MPEGA.LIBRARY FOR MAXIMUM SPEED OR AUDIO PLAYBACK *****
  149. *****                                                                          *****
  150. ************************************************************************************
  151.  
  152.  
  153. How to use it
  154. -------------
  155.  
  156. Syntax: MPEGA [<options>] <MPEG Audio file> [<out pcm file>]
  157.  
  158. options are:
  159.  
  160. -d <freq_div>   frequency division: 1, 2 or 4
  161. -q <quality>    output quality: 0 (worst), 1 or 2 (best)
  162. -h              display header only
  163. -n              no frame counter
  164. -m              mono output (left channel)
  165. -p <pri>        process priority (-30..30)
  166. -I[<id>]        AHI output, <id> = Audio mode ID in hex (ex: -I20004)
  167. -s              silence (no audio output)
  168. -f 0|1          audio filter off/on (default = auto)
  169. -x <freq>       audio mixing frequency (default = none)
  170. -t <ms>         audio buffer time in ms (default = 1 sec)
  171. -v <vol>        audio volume (0..64 or 65..256 for boost)
  172. -V              read audio volume from file comment (VOL=xx)
  173. -w              wait for audio buffer to be full before starting audio
  174. -a              audio buffer fill level in secs (use with -T option)
  175. -S <ms>         seek to time postion in stream (unit is ms)
  176. -L <ms>         play length (unit is ms)
  177. -A              write AIFF header to output file
  178. -W              write WAVE header to output file
  179. -F <freq_max>   max decoding frequency (auto freq_div)
  180. -T              display time counter instead of frame counter
  181. -b <k_size>     set the input file buffer size in KBytes (default = 16KB)
  182. -D              display decoding parameters
  183. -l              input file is a play list (text file)
  184. -o <out file>   output decoded file
  185. -c <cfg file>   configuration file (default = MPEGA.CFG)
  186. -C              display current configuration
  187. -e              exclude reading of default configuration file
  188. -y              dynamic boost for audio output (maximize audio dynamic)
  189. -k <scale_per>  scale decoded output by scale factor in %
  190. -K              read scale from file comment (SCA=xx)
  191. -u              display time used
  192. -r              don't use Async I/O for input file (no lock)
  193. -N              Display filename
  194. -R              random play
  195. -i              display TAG infos
  196.  
  197. Play list
  198. ~~~~~~~~~
  199.  
  200. A play list is a text file, each line containing a filename (and its path).
  201.  
  202. Example:
  203.  
  204. ----- BEGIN OF playlist.txt -----
  205. mpega:films/PFICTION.MP3
  206. mpega:films/Blade_Runner/Blade_Runner_Blues.mp2
  207. mpega:Angra/Carolina_IV.mp2
  208. ------ END OF playlist.txt ------
  209.  
  210. -> 'mpega -l playlist.txt' will play all the files in this play list
  211.  
  212.  
  213. Config File
  214. ~~~~~~~~~~~
  215.  
  216. The default config file is 'MPEGA.CFG' loaded each time you start mpega.
  217. It try to read MPEGA.CFG from ENV:, S:, PROGDIR:, and then current directory.
  218.  
  219. You can specify an alternate config file with -c option.
  220.  
  221. A config file is a set of line options. The first 4 lines are used to
  222. configure the mpeg decoder according to the mpeg audio file type.
  223.  
  224. line option #  mpeg audio file type
  225.      1         Layer I or II, Mono
  226.      2         Layer III, Mono
  227.      3         Layer I or II, Stereo
  228.      4         Layer III, Stereo
  229.  
  230. On this first lines, only options -d, -q, -F and -m are allowed
  231.  
  232. The next lines are used as default options, as they were entered
  233. on the command line.
  234. Comment lines are blank lines or lines begining with #
  235.  
  236. Example of config file:
  237.  
  238. ----- BEGIN OF MPEGA.CFG -----
  239. # Config file for MPEGA
  240. #
  241. # WARNING You must not change the config lines order !
  242. #         option line is limited to 255 characters
  243. #
  244. # MPEG decoder options (allowed options: -d -q -F -m)
  245. #
  246. # Mono files:
  247. # Layers I & II
  248. -d1 -q2
  249. # Layers III
  250. -d2 -q1
  251. #
  252. # Stereo files:
  253. # Layers I & II
  254. -d1 -q1 -m
  255. # Layers III
  256. -q0 -F22050 -m
  257. #
  258. # Default options (all options allowed, may overwrite previous options)
  259. -u -T
  260. ------ END OF MPEGA.CFG ------
  261.  
  262. TAG infos
  263. ~~~~~~~~~
  264.  
  265. TAG infos are often used now for mp3 files. When tag info is available and -i option
  266. is selected, an info line will appear with the following format:
  267. <title> (<artist>) [<album>] <year> - <genre> - <comment>
  268.  
  269. TAG info can be added/modified with the utility mp3Info by Thorvald Natvig.
  270. This utility can be found in aminet/mus/misc (Amiga version by mikecheng@cryogen.com)
  271.  
  272. Examples:
  273.  
  274. playing sound without counter, priority of 10:
  275.  
  276.    mpega -p10 -n <mpeg file>
  277.  
  278. or with AHI:
  279.  
  280.    mode id requester:
  281.    mpega -p10 -n -I <mpeg file>
  282.  
  283.    mode id 20004:
  284.    mpega -p10 -n -I20004 <mpeg file>
  285.  
  286. playing on a pal screen (limit to 28Khz):
  287.  
  288.    mpega -x28000 <mpeg file>
  289.  
  290. creating an output pcm file without sound:
  291.  
  292.    mpega -s <mpeg file> <output pcm file>
  293.  
  294. creating an output AIFF file without sound:
  295.  
  296.    mpega -s -A <mpeg file> <output pcm file>
  297.  
  298.  
  299. Limit the decoding frequency to 22.05KHz
  300.  
  301.    mpega -F22050 <mpeg file>
  302.  
  303. Find best boost volume or scale value:
  304.  
  305.    mpega -s -y <file>
  306.  
  307.    after all decoding (no sound) a line info tells you something like:
  308.  
  309.    Samples in [-24231..21965] -> boost up to 135 % (VOL=86)
  310.  
  311.    You can use scale option -K 135 to get maximum dynamic or boost the volume
  312.    to 86 (don't set both) ! Prefer to use scale option as it is more accurate.
  313.  
  314. Using file comment to set volume or scale
  315.  
  316.    mpega -K -V <file>
  317.  
  318.    Example of file comments:
  319.  
  320.    'Test file MPEG1-III [VOL=89]'         -> Set volume to 89
  321.    'Test file MPEG1-III [SCA=145]'        -> Set scale factor to 145%
  322.    'Test file MPEG1-III [VOL=50 SCA=145]' -> Set volume and scale factor
  323.  
  324.    Note: keywords VOL= and SCA= are case sensitive and can be anywhere inside comment
  325.  
  326. Copyrights
  327. ----------
  328.  
  329. AHI is Copyright ©1994-96 Martin Blom
  330.  
  331. Credits
  332. -------
  333.  
  334. Thanks to Thorvald Natvig <xeno@mix.hive.no> for his mp3info sources (read & write of TAG info)
  335. ID3 TAG format by NamkraD/DC (erick@marble.net)
  336.  
  337.  
  338. Thanks to my friend, AMIGA, the best computer ever made.
  339.  
  340.            / /
  341.           / /
  342.          / /
  343.    \ \  / /
  344.     \ \/ /
  345.      \/\/
  346.  
  347. Stéphane TAVENARD (ANGERS/France)
  348. Email: stephane.tavenard@wanadoo.fr
  349. Web: http://perso.wanadoo.fr/stephane.tavenard
  350.  
  351. Send your gifts here :^)
  352.  
  353. Stéphane TAVENARD
  354. La Bezanière
  355. 49070 Saint Jean de Linières
  356. FRANCE
  357.